set :application, "lady2shop"
set :repository,  "http://ladyshop.googlecode.com/svn/trunk/"

set :scm, :subversion
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`

set :user, "root"
role :web, "118.126.2.138"                          # Your HTTP server, Apache/etc
role :app, "118.126.2.138"                          # This may be the same as your `Web` server
role :db,  "118.126.2.138", :primary => true # This is where Rails migrations will run

set :use_sudo, true
if ENV['where'] == 'releases'
	set :deploy_to, "/home/www/ladyshop"
else
	set :deploy_to, "/home/www/ladyshop_staging"
end

# If you are using Passenger mod_rails uncomment this:
# if you're still using the script/reapear helper you will need
# these http://github.com/rails/irs_process_scripts

namespace :deploy do
  task :start do ; end
  task :stop do ; end
		task :restart, :roles => :app, :except => { :no_release => true } do
		  run <<-CMD
		    ln -nfs  #{shared_path}/config/database.yml #{current_path}/config/database.yml;
	  CMD
	  run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
	end
	
	task :after_update_code, :roles => :app do
		run "rm -rf #{release_path}/public/.htaccess"
	end
end
